package com.tyk.bookstore.back.order.model.vo;


import com.tyk.bookstore.back.common.core.model.page.PageVo;
import com.tyk.bookstore.back.common.core.model.type.PaymentWay;
import com.tyk.bookstore.back.order.model.enume.OrderState;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author tyk
 * @description 订单
 */
@Data
public class OrderPageVo extends PageVo<OrderPageVo.Order> {
    @Data
    public static class Order {

        @Schema(description = "ID")
        private Long id;

        @Schema(description = "订单号")
        private String orderNo;

        @Schema(description = "订单金额")
        private BigDecimal amount;

        @Schema(description = "仓库ID")
        private Long warehouseId;

        @Schema(description = "仓库名称")
        private String warehouseName;

        @Schema(description = "订单状态")
        private OrderState state;

        @Schema(description = "创建时间")
        private LocalDateTime createTime;

        @Schema(description = "收件人")
        private String cneeName;

        @Schema(description = "支付方式[0商城余额，1支付宝，2微信]")
        private PaymentWay paymentWay;

        @Schema(description = "子订单")
        private List<Order> children;

    }
}
